The present invention relates to an industrial control system used for real-time control of industrial processes, and in particular to an I/O module that samples a signal from a component of an industrial process, stores multiple samples from the component as a data block, and then outputs the data block to an industrial controller synchronously.
Industrial controllers are special purpose computers used for controlling industrial processes and manufacturing equipment on a real-time basis. Under the direction of a stored program, the industrial controller examines a set of inputs reflecting the status of the controlled process and changes a set of outputs controlling the industrial process. The inputs and outputs may be binary, which is on or off, or analog, providing a value within a continuous range. Typically analog signals are converted to binary words for processing. Industrial controllers differ from conventional computers in that their hardware configurations vary significantly from application to application reflecting their wide range of uses. This variability is accommodated by constructing the industrial controller on a modular basis having removable input and output (I/O) modules that may accommodate different numbers of input and output points depending on the process being controlled. The need to connect the I/O modules to different pieces of machinery that may be spatially separated has led to the development of a remote I/O rack holding a number of I/O modules at a remote location to communicate with a central processor of the industrial control via an adapter module, which in turn is connected with a high speed network linked to the central processor. The adapter exchanges information between the network and the I/O modules.
Industrial controllers further differ from conventional computers in that they must process a large amount of input and output data on a predictable real-time basis. This requires not only that the response time of the industrial controller be extremely fast, but also that the processing delay between a changing input and the response of a reacting output be consistent so that the controller operates predictably over time.
To satisfy these requirements of speed and consistency, many industrial controllers use a “scan” based architecture in which each input and output are sequentially read and written over repeated scans of regular duration. Newer industrial controllers may use a producer/consumer model which allows I/O modules to produce data when sampled rather than waiting for a controller scan. This produce/consume protocol may also be used in the communication between an adapter module and the I/O modules of a remote I/O rack. The immediate production of data makes the data available to be used in the system as quickly as possible and reduces overhead on the controller to actively scan all inputs, even when no new data is available.
During operation of an industrial process, the industrial controller consumes data produced by the I/O modules, which acquires or samples data from various components of the industrial process, in a timed loop. Conventionally, each I/O module has included a buffer that stores a single sample of data from a component of the industrial process. When the I/O module is polled by the industrial controller or in a producer/consumer model when the I/O module determines it is time to send the data, the content of the buffer is output to the industrial controller; however, since the I/O module is continuously or periodically sampling the controlled component, samples are acquired that are never fed to, or processed by, the industrial controller. That is, conventional I/O modules sample the controlled components at a sampling rate that is faster than the scan rate of the industrial controller, whether the scan rate is the polling rate of the industrial controller or the industrial controller data processing rate, typically program scan time.
FIG. 1, for example, illustrates the data flow for a conventional I/O module. In this example, data is acquired at a sampling rate defined by sampling interval 1. No delay is assumed between the acquisition of data from the industrial process at the sampling interval 1 and the output of that data to the industrial controller. Thus, at t0, a sample S0 is acquired and the data A0 for that sample is output to the industrial controller, which reads the data from the I/O module, for purposes of illustration, at t0. At t1, the I/O module again samples S1 the industrial process to acquire data A1. However, since the industrial controller polled the I/O module for one polling interval 2 at t0, at t1, the industrial controller has proceeded in its polling loop to poll the next I/O module in the loop. Thus, data A1 is not output to the industrial controller at t0. Similarly, the data A2 for sample S2 acquired at t2 is not output to the industrial controller. Similarly in a producer/consumer model the I/O module may have produced the data to the controller, but the controller may not have had time to process the new data, given its own internal program scan, and thus missed processing the A1 and A2 data. In a producer/consumer system newly produced data will automatically overwrite older data. If the controller does not process A1 in a timely manner the data will be overwritten and lost when A2 is produced by the I/O module. Moreover, in conventional I/O modules, the data for only a single sample is stored in a buffer. Thus, data A1 will be written over by data A2 at t2 at the next sampling interval 1. This cycle repeats until the next time the I/O module is polled by the industrial controller. For an I/O module that is polled at time intervals of length 20, the next data provided to the industrial controller will be the data A19 acquired from the controlled component in sample S19 at t19. Accordingly, one of the drawbacks of conventional I/O modules is the loss of data between I/O module readout intervals if the controller processing rate is not synchronized precisely with the module sampling period.
To minimize the effect of this unused data, one proposed solution is to increase the polling rate of the industrial controller. By doing so, the I/O module may be polled at time intervals of 10, for example, thereby decreasing the amount of data that is discarded, but this requires a lot more processing power in the controller and focuses limited resources solely on processing I/O data. Another proposed solution is to decrease the sampling rate of the I/O modules. Because both solutions would effectively reduce the amount of data that is acquired but not used in assessing performance of the industrial process, both solutions are impractical for high speed applications.
In the case of the latter, reducing the sampling rate of the I/O module decreases the precision of the monitoring function performed by the I/O module. For example, a signal from a component may be sampled to acquire data over a given period of time to determine any trends in performance of the component. By reducing the number of samples acquired from the controlled component, it may be difficult to properly determine changes in the trend or the causes of any such changes. In the case of the former, an increase in the polling rate of the industrial controller may not be possible because the communication overhead associated with data transfer between the industrial controller and the I/O modules limits the speed at which data can be read.